package com.tsc.design.responsibilityMode.example1;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: chentl
 * @Date: 2025/09/17/18:40
 * @Description:
 */
public class ProjectManage extends LeaveHandler{

    @Override
    public String handleRequest(LeaveRequest leaveRequest) {
        if (leaveRequest.getLeaveDays() <= 3) {
            return String.format("项目经理批准了%s的%d天请假申请，理由：%s",
                    leaveRequest.getEmployeeName(),
                    leaveRequest.getLeaveDays(),
                    leaveRequest.getReason());
        }else if(nextHandler != null){
            return nextHandler.handleRequest(leaveRequest);
        }else {
            return "请假申请无人处理";
        }
    }
}
